Back to Main Menu

Create Assessment Form Result

Introduction

The following Assetic REST API endpoint may be used to create a new assessment form result:

  • POST /api/v2/assessmentformresult

Assessment Form Result Definition

When creating a new assessment form result the following properties are relevant:

Property Description Type Sample
FormId

The unique identifier of an assessment form definition, which defines the control widgets that the form result data is applied against.

Refer to the integration article Get Assessment Forms for information on retrieving an assessment form definition.

GUID "FormId": "9680546d-4f56-e711-8187-025500ccdddb"
FormResultStartTime

The date the assessment form result begins.

DateTime "FormResultStartTime": "2023-01-01T00:00:00"
FormResultEndTime

The date the assessment form result ends.

DateTime "FormResultEndTime": "2023-01-31T23:59:99"
FormResultLastModified

The date the assessment form result was last modified.

Use the current DateTime.

DateTime
"FormResultLastModified""2023-01-06T12:50:12",
FormResultStatus

The current status of the assessment form Result.

0="Active"

100="Inactive"

Integer "FormResultStatus": 0
FormResultComment

General comments for the assessment task.

4000 character limit.

String "FormResultComment""Example Comment"
FormResultSkipped

Specify if the assessment result was skipped or not.

Boolean 'true' or 'false'.

Boolean "FormResultSkipped": false
FormResultRsResourceIdAssessedBy

An object containing the "Id" (GUID) and "DisplayName" (STRING) properties for the resource that gathered the assessment result data.

See the Get Resources article for additional information on retrieving resource details.

Object

"FormResultRsResourceIdAssessedBy": {
"Id": "3c5dab0b-3af9-4100-a2c2-4b7527dbb202",
"DisplayName": "Assetic System"
}

Data

An object containing the assessment data, for all controls defined in the parent assessment form definition.

Properties within the object are defined as key-value pairs, where the assessment form control name is the key and the value is the data supplied by the assessor.

Additional information about a specific form's controls can be obtained by retrieving its definition, as described in the article Get Assessment Forms

Object "Data": {
"C0616ee451ca64fd8aed2b85885a1e08e": "Example Text Value",
"C0cc9c225ccea445bbc43e96b3560083b": "Example Text Area Value",
"C59d636e47dd4423f9bad07da82aec454": 1,
"C608a43fee61b4a118b64f8aeed658b5a": "2023-02-03T01:14:42",
"C1878625b38d74d66a8ed3ad7add738b2": "2023-02-03T01:14:42",
"C80b329352e3441eabd120db9523a1339": "Dropdown Value"
}
ParentEntityId
Unique system-generated identifier for the parent Assessment Task that the form result has been applied against. GUID "ParentEntityId": "064a8546-7966-4ef4-a9c7-6ae06f934e74"

Sample Payload

The following is a typical payload used to create a new Assessment Form Result.

Sample Request

In this example request payload, an assessment form result is created and linked to an existing assessment task. The key-value pairs specified within the "Data" property object correspond to the form controls defined in the custom assessment form definition used for this example:

{

"FormId": "9680546d-4f56-e711-8187-025500ccdddb",

"FormResultStartTime": "2023-02-02T00:00:00",

"FormResultEndTime": "2023-02-07T23:59:59",

"FormResultLastModified": "2023-02-07T02:20:03",

"FormResultStatus": 0,

"FormResultComment": "Example Assessment Form Result POST using the API",

"FormResultSkipped": false,

"FormResultRsResourceIdAssessedBy": {

"Id": "3c5dab0b-3af9-4100-a2c2-4b7527dbb202",

"DisplayName": "Assetic System"

},

"Data": {

"C0616ee451ca64fd8aed2b85885a1e08e": "Example Text Value",

"C0cc9c225ccea445bbc43e96b3560083b": "Example TextArea Value",

"C59d636e47dd4423f9bad07da82aec454": 1,

"C608a43fee61b4a118b64f8aeed658b5a": "2023-01-18T09:17:57",

"C1878625b38d74d66a8ed3ad7add738b2": "2023-05-22T16:17:57",

"C80b329352e3441eabd120db9523a1339": "Dropdown Value 1"

},

"ParentEntityId": "064a8546-7966-4ef4-a9c7-6ae06f934e74"

}

Sample Response

The response is returned as a collection and includes the system-generated unique GUID for the assessment form result within the "Id" property of the response:

{

"Data": [

{

"Id": "56f3ff96-ff7d-4b3b-bdd9-26a3ea6e540c",

"FormId": "9680546d-4f56-e711-8187-025500ccdddb",

"FormName": null,

"FormLabel": null,

"FormVersion": 0,

"FormApplicableLevel": 0,

"FormResultId": 2822,

"FormResultStartTime": "2023-02-02T00:00:00",

"FormResultEndTime": "2023-02-07T23:59:59",

"FormResultLastModified": "2023-02-07T02:20:03",

"FormResultStatus": 0,

"FormResultComment": "Example Assessment Form Result POST using the API",

"FormResultSkipped": false,

"FormResultSkippedReason": 0,

"FormResultRsResourceIdAssessedBy": {

"Id": "3c5dab0b-3af9-4100-a2c2-4b7527dbb202",

"DisplayName": "Assetic System",

"_links": [],

"_embedded": null

},

"FormResultAspNetUserCreatedBy": null,

"FormResultIsRequiredBySystem": false,

"FormResultASMTFormVersionId": "00000000-0000-0000-0000-000000000000",

"Data": {

"C0616ee451ca64fd8aed2b85885a1e08e": "Example Text Value",

"C0cc9c225ccea445bbc43e96b3560083b": "Example TextArea Value",

"C59d636e47dd4423f9bad07da82aec454": 1,

"C608a43fee61b4a118b64f8aeed658b5a": "2023-01-18T09:17:57",

"C1878625b38d74d66a8ed3ad7add738b2": "2023-05-22T16:17:57",

"C80b329352e3441eabd120db9523a1339": "Dropdown Value 1"

},

"ParentEntityId": "064a8546-7966-4ef4-a9c7-6ae06f934e74",

"_links": [],

"_embedded": null

}

],

"Total": 1

}